package com.supermarket.manage.provider.ucenter.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import com.supermarket.manage.common.dto.member.request.MemberPageParams;
import com.supermarket.manage.common.pojo.Member;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author Faxon
 * @version 1.0
 * @date 2020-03-12 19:01
 **/
@Mapper
public interface MemberManageMapper extends BaseMapper<Member> {
    /**
     * 条件、分页查询会员
     *
     * @param params
     * @return
     */
    Page<Member> getMemberPageList(MemberPageParams params);

    /**
     * 获取会员列表
     *
     * @param params
     * @return
     */
    List<Member> getMemberList(MemberPageParams params);

    /**
     * 增加会员积分
     * @param memberId
     * @param addValue
     * @return
     */
    int addIntegral(@Param("memberId") String memberId,@Param("addValue") BigDecimal addValue);
}
